package idiet.service;

import java.util.List;

import idiet.bean.CustomerNurse;
import idiet.bean.CustomerNurseMeal;
import idiet.bean.CustomerNurseMealRecipe;
import idiet.dao.hibernate.CustomerNurseMealRecipeDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("customerNurseMealRecipeService")
public class CustomerNurseMealRecipeService {
	@Autowired
	CustomerNurseMealRecipeDao customerNurseMealRecipeDao;
	public CustomerNurseMealRecipe getCustomerNurseMealRecipe(int customerNurseMealRecipeId){
		return this.customerNurseMealRecipeDao.getCustomerNurseMealRecipeById(customerNurseMealRecipeId);
	}
	public List<CustomerNurseMealRecipe> getCustomerNurseMealRecipe(){
		return this.customerNurseMealRecipeDao.getCustomerNurseMealRecipes();
	}
	public List<CustomerNurseMealRecipe> getCustomerNurseMealRecipe(CustomerNurseMeal meal){
		if(meal==null){
			return this.customerNurseMealRecipeDao.getCustomerNurseMealRecipes();
		}else{
			return this.customerNurseMealRecipeDao.getCustomerNurseMealRecipesByCustomerNurseMeal(meal);
		}
	}
	public void createCustomerNurseMealRecipe(CustomerNurseMealRecipe customerNurseMealRecipe){
		this.customerNurseMealRecipeDao.createCustomerNurseMealRecipe(customerNurseMealRecipe);
	}
	public void updateCustomerNurseMealRecipe(CustomerNurseMealRecipe customerNurseMealRecipe){
		this.customerNurseMealRecipeDao.updateCustomerNurseMealRecipe(customerNurseMealRecipe);
	}
	public void deleteCustomerNurseMealRecipe(CustomerNurseMealRecipe customerNurseMealRecipe){
		this.customerNurseMealRecipeDao.deleteCustomerNurseMealRecipe(customerNurseMealRecipe);
	}
}
